package com.houweishi.module.warehouse.service.impl;

import java.util.List;
import com.houweishi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.houweishi.module.warehouse.mapper.BizWarehouseMapper;
import com.houweishi.module.warehouse.domain.BizWarehouse;
import com.houweishi.module.warehouse.service.IBizWarehouseService;

/**
 * 仓库管理Service业务层处理
 * 
 * @author houweishi
 * @date 2023-02-25
 */
@Service
public class BizWarehouseServiceImpl implements IBizWarehouseService 
{
    @Autowired
    private BizWarehouseMapper bizWarehouseMapper;

    /**
     * 查询仓库管理
     * 
     * @param id 仓库管理主键
     * @return 仓库管理
     */
    @Override
    public BizWarehouse selectBizWarehouseById(Long id)
    {
        return bizWarehouseMapper.selectBizWarehouseById(id);
    }

    /**
     * 查询仓库管理列表
     * 
     * @param bizWarehouse 仓库管理
     * @return 仓库管理
     */
    @Override
    public List<BizWarehouse> selectBizWarehouseList(BizWarehouse bizWarehouse)
    {
        return bizWarehouseMapper.selectBizWarehouseList(bizWarehouse);
    }

    /**
     * 新增仓库管理
     * 
     * @param bizWarehouse 仓库管理
     * @return 结果
     */
    @Override
    public int insertBizWarehouse(BizWarehouse bizWarehouse)
    {
        bizWarehouse.setCreateTime(DateUtils.getNowDate());
        return bizWarehouseMapper.insertBizWarehouse(bizWarehouse);
    }

    /**
     * 修改仓库管理
     * 
     * @param bizWarehouse 仓库管理
     * @return 结果
     */
    @Override
    public int updateBizWarehouse(BizWarehouse bizWarehouse)
    {
        bizWarehouse.setUpdateTime(DateUtils.getNowDate());
        return bizWarehouseMapper.updateBizWarehouse(bizWarehouse);
    }

    /**
     * 批量删除仓库管理
     * 
     * @param ids 需要删除的仓库管理主键
     * @return 结果
     */
    @Override
    public int deleteBizWarehouseByIds(Long[] ids)
    {
        return bizWarehouseMapper.deleteBizWarehouseByIds(ids);
    }

    /**
     * 删除仓库管理信息
     * 
     * @param id 仓库管理主键
     * @return 结果
     */
    @Override
    public int deleteBizWarehouseById(Long id)
    {
        return bizWarehouseMapper.deleteBizWarehouseById(id);
    }
}
